import 'package:flutter_framework/views/dev_page/dev_page.dart';
import 'package:flutter_framework/views/test_network/test_network.dart';
import 'package:flutter_framework/views/home/home.dart';
import 'package:flutter_framework/views/test_page_export.dart';
import 'package:flutter_framework/views/test_router/detail/test_router_arg_detail.dart';
import 'package:flutter_framework/views/test_theme/test_theme.dart';
import 'package:flutter_framework/views/widget_demo/widget_demo.dart';
import 'package:get/get.dart';
import 'package:flutter_framework/extens/str_ext.dart';

import '../../views/device_info/device_info.dart';

class HomeRouter {
  static const String home = '/home';
  static const String testNetwork = '/testNetwork';
  static const String testImg = '/testImg';
  static const String testVideo = '/testVideo';

  static const String testRouter = '/testRouter';
  static const String testRouterDetail = '/testRouterDetail';
  static const String testRouterDetailUrl = '$testRouter$testRouterDetail';
  static const String testRouterArgDetail = '/testRouterArgumentDetail';
  static const String testRouterArgDetailUrl =
      '$testRouter$testRouterArgDetail';

  static const String testRouterPathDetail = '/testRouterPathDetail/:id';
  static String testRouterPathDetailUrl =
      '$testRouter${testRouterPathDetail.pathSplit}';
  static const String addCartAnimate = '/addCartAnimate';

  static const String notFound = '/notFoundPage';
  static const String language = '/language';
  static const String testTheme = '/testTheme';
  static const String deviceInfo = '/deviceInfo';
  static const String widgetDemo = '/widgetDemo';
  static const String genController = '/genController';
  static const String testInerited = '/testInerited';
}

List<GetPage<dynamic>> getHomeRoutes() {
  return [
    // GetPage(name: HomeRouter.home, page: () => DevPage()),
    GetPage(name: HomeRouter.testNetwork, page: () => TestNetwork()),
    GetPage(name: HomeRouter.home, page: () => const MyHomePage()),
    GetPage(name: HomeRouter.testImg, page: () => const TestImg()),
    GetPage(name: HomeRouter.testVideo, page: () => const TestVideo()),
    GetPage(name: HomeRouter.language, page: () => const Language()),
    GetPage(name: HomeRouter.testTheme, page: () => const TestTheme()),
    GetPage(name: HomeRouter.deviceInfo, page: () => const DeviceInfo()),
    GetPage(name: HomeRouter.widgetDemo, page: () => const WidgetDemo()),
    GetPage(name: HomeRouter.genController, page: () => const GenController()),
    GetPage(name: HomeRouter.testInerited, page: () => const TestInerited()),
    GetPage(
      name: HomeRouter.testRouter,
      page: () => const TestRouter(),
      children: [
        GetPage(
            name: HomeRouter.testRouterDetail,
            page: () => const TestRouterDetail()),
        GetPage(
            name: HomeRouter.testRouterArgDetail,
            page: () => const TestRouterArgDetail()),
        GetPage(
            name: HomeRouter.testRouterPathDetail,
            page: () => const TestRouterPathDetail()),
      ],
    ),
    GetPage(
      name: HomeRouter.addCartAnimate,
      page: () => GoodsListPage(),
    ),
  ];
}
